package com.woniuxy02;

import java.util.Scanner;

public class Test03 {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        int sum=0,avg=0,score=0;
        for (int i=1;i<=3;i++) {
            sum=0;
            for(int j=1;j<=3;j++){
                System.out.println("输入第"+i+"班，第"+j+"名同学的成绩");
                score=scanner.nextInt();
                sum+=score;
            }
            avg=sum/3;
            System.out.println("总分:"+sum);
            System.out.println("平均分:"+avg);
        }
    }
}
